O5 Linux in Ubuntu 18.04LTS for Windows10
Full credit should be given to TransmitterDan for this configuration and explanation. He wrote:
The configuration does not use Virtual Box or HyperV, requires a current version a of Windows10 and uses about 2.5gb of hard drive. This system does support graphics applications and OpenGL, because most Linux graphics apps (including OpenCPN) can use X-Windows. All you need is an X server that WSL can talk to. There are multiple solutions available including xrdp, Mobaxterm, etc. I like xrdp the best.
Compiling is pretty fast on my old i7 machine. I can run ‘make -j 12’ and it compiles O in Linux very quickly. Faster than Microsoft Windows compiler even. I have installed ddd for debugging and it works too. So far the overall system seems very stable, responsive and usable. It's a pretty good development platform.
I can compile the latest version of wxWidgets from git and it sort of works. There are a lot of new things in wx that seem at odds with O. The error about can’t seek on files plus lots and lots of gratuitous log file messages coming from wx. The wx team seems to be weeding some of that out.
Open the Ubuntu terminal and run:
$ sudo apt install xrdp xfce4 openssh-server $ sudo service xrdp start $ sudo service ssh start
The apt install will be a long download of about 500mb. You don’t actually need ssh but it can be handy especially if you use WinSCP to access the Linux file system from Windows.
XFCE Linux Desktop provides useful Linux tools such as a File Manager, etc.
The rdp server (remote desktop protocol server) XRDP by Neutrino Labs provides the linux link to the Windows Remote Desktop Client in Windows.
From the OpenCPN Developer Manual:
$ sudo apt-get install build-essential cmake gettext git-core gpsd gpsd-clients libgps-dev wx-common libwxgtk3.0-dev libglu1-mesa-dev libgtk2.0-dev wx3.0-headers libbz2-dev libtinyxml-dev libportaudio2 portaudio19-dev libcurl4-openssl-dev libexpat1-dev libcairo2-dev libarchive-dev liblzma-dev libexif-dev libelf-dev libsqlite3-dev
From the OpenCPN Developer Manual: Run to get a local copy of the source code:
$ git clone https://github.com/[user]/opencpn.git (use your github username in place of “user”.)
This will be a long download of about 500mb.
From the OpenCPN Developer Manual: Build everything in a subdirectory to keep the codebase clean (easier to catch changes).
$ cd OpenCPN //# unless already in this directory.// $ mkdir build $ cd build $ cmake ../ $ sudo make install
Once finished, start Remote Desktop Client in Windows Note:Windows 10 Home edition users will need to upgrade to Windows 10 Pro
Use the Windows search (bottom left) to find “Remote Desktop Client in Windows App”. Make a Desktop or Start Shortcut. Use Remote Desktop Client to Connect to the Computer .
localhost:3389 Session: xorg User: same username you used for Ubuntu for Windows. Password: same password you used for Ubuntu for Windows. Check to remember username.
This is the xFCE Linux Desktop application
Open Ubuntu terminal
$ sudo service xrdp start $ sudo service ssh start
From Windows Menus start Remote Desktop Connections (Client) and log in. Opens to the xFCE Linux Desktop From the upper left: Applications > Education (dropdown) > OpenCPN
Check where the OpenCPN files are located:
$ which opencpn /usr/bin/opencpn
If the system did not completely install the program so it copies all the style files and so forth to the right places So maybe your install didn't go as planned…. in the build folder type:
$ sudo make install
Then run OpenCPN from the program start menu on the desktop. Maybe you are starting opencpn from a command line and starting it from the build folder. That won't always work.
Desktop Launcher
Find the Linux Desktop “Launcher” to create an OpenCPN shortcut icon on the desktop.. Use File Manager to find out where opencpn files are stored.
Desktop File Manager